package cn.iocoder.yudao.framework.flowable.core;

import cn.iocoder.yudao.framework.common.auth.LoginInfoHolder;
import cn.iocoder.yudao.framework.common.core.RequestSection;
import cn.iocoder.yudao.framework.flowable.core.util.FlowableUtils;

public class FlowRequestSection implements RequestSection {
    @Override
    public void begin() {
        FlowableUtils.setAuthenticatedUserId(LoginInfoHolder.getLoginUserDefault().getId());
    }

    @Override
    public void end() {
        FlowableUtils.clearAuthenticatedUserId();
    }
}
